package com.sj.uabrowser.app;

public class TianqiIconUtil {


    public static String getIconName(String tq) {
        StringBuilder name = new StringBuilder();
        name.append("tianqi_");
        switch (tq) {
            case "暴雪":
                return name.append("baoxue").toString();
            case "暴雨":
                return name.append("baoyu").toString();
            case "暴雨到大暴雨":
                return name.append("baoyudaodabaoyu").toString();
            case "大暴雨":
                return name.append("dabaoyu").toString();
            case "大暴雨到特大暴雨":
                return name.append("dabaoyudaotedabaoyu").toString();
            case "大到暴雪":
                return name.append("dadaobaoxue").toString();
            case "大到暴雨":
                return name.append("dadaobaoyu").toString();
            case "大雾":
                return name.append("dawu").toString();
            case "大雪":
                return name.append("daxue").toString();
            case "大雨":
                return name.append("dayu").toString();
            case "冻雨":
                return name.append("dongyu").toString();
            case "多云":
                return name.append("duoyun").toString();
            case "浮尘":
                return name.append("fuchen").toString();
            case "雷阵雨":
                return name.append("leizhenyu").toString();
            case "雷阵雨伴有冰雹":
                return name.append("leizhenyubanyouduoyun").toString();
            case "霾":
                return name.append("mai").toString();
            case "浓雾":
                return name.append("nongwu").toString();
            case "强浓雾":
                return name.append("qiangnongwu").toString();
            case "强沙尘暴":
                return name.append("qiangshachenbao").toString();
            case "晴":
                return name.append("qing").toString();
            case "沙尘暴":
                return name.append("shachenbao").toString();
            case "特大暴雨":
                return name.append("tedabaoyu").toString();
            case "特强浓雾":
                return name.append("teqiangnongwu").toString();
            case "雾":
                return name.append("wu").toString();
            case "小到中雪":
                return name.append("xiaodaozhongxue").toString();
            case "小到中雨":
                return name.append("xiaodaozhongyu").toString();
            case "小雨":
                return name.append("xiaoyu").toString();
            case "严重霾":
                return name.append("yanzhongmai").toString();
            case "扬沙":
                return name.append("yangsha").toString();
            case "阴":
                return name.append("yin").toString();
            case "雨":
                return name.append("xiaoyu").toString();
            case "雨夹雪":
                return name.append("yujiaxue").toString();
            case "阵雪":
                return name.append("zhenxue").toString();
            case "阵雪（夜间）":
                return name.append("zhenxueyejian").toString();
            case "阵雨":
                return name.append("zhenyu").toString();
            case "中到大雪":
                return name.append("zhongdaodaxue").toString();
            case "中到大雨":
                return name.append("zhongdaodayu").toString();
            case "中度霾":
                return name.append("zhongdumai").toString();
            case "中雪":
                return name.append("zhongxue").toString();
            case "中雨":
                return name.append("zhongyu").toString();
            case "重度霾":
                return name.append("zhongdumai2").toString();
        }
        return name.append("qing").toString();
    }

    public static int getBg(String name) {
        if(name.contains("转")){
            name = name.substring(name.indexOf("转"));
        }else if(name.contains("伴")){
            name = name.substring(name.indexOf("伴"));
        }
        switch (name) {
            case "晴":
                return 0;
            case "阴":
                return 1;
            case "多云":
                return 2;
            case "雨":
            case "大暴雨":
            case "中雨":
            case "中到大雨":
            case "大到暴雨":
            case "大雨":
            case "小到中雨":
            case "特大暴雨":
            case "小雨":
            case "暴雨":
            case "暴雨到大暴雨":
            case "大暴雨到特大暴雨":
            case "阵雨":
                return 3;
            case "小雪":
            case "阵雪":
            case "雨夹雪":
            case "中雪":
            case "中到大雪":
            case "大到暴雪":
            case "小到中雪":
            case "大雪":
            case "阵雪（夜间）":
            case "暴雪":
                return 4;
            case "雷阵雨":
            case "雷阵雨伴有冰雹":
                return 5;
            case "冻雨":
                return 6;
            case "雾":
            case "强浓雾":
            case "大雾":
            case "特强浓雾":
            case "浓雾":
                return 7;
            case "重度霾":
            case "霾":
            case "中度霾":
            case "严重霾":
            case "沙尘暴":
            case "强沙尘暴":
            case "扬沙":
            case "浮尘":
                return 8;

        }
        return 0;
    }

    public static final String[] WEA = {"sunny","cloudy","cloud","rain","snow","thunder","hail","fog","haze"};

}
